// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者，助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import BasicLayout from '@/layouts/basic-layout';
import Setting from '@/setting';

const pre = 'stock_';

export default {
    path: `${Setting.roterPre}/stock/`,
    name: 'stock',
    header: 'stock',
    meta: {
        // 授权标识
        auth: ['supplier-stock']
    },
    redirect: {
        name: `${pre}stockList`
    },
    component: BasicLayout,
    children: [
        {
            path: 'list',
            name: `${pre}stockList`,
            meta: {
                title: '商品列表',
                auth: ['supplier-stock-list']
            },
            component: () => import('../../pages/stock/stockList')
        },
        {
            path: 'inbound_list',
            name: `${pre}inboundList`,
            meta: {
                auth: ['supplier-stock-inbound_list'],
                title: '入库单'
            },
            component: () => import('@/pages/stock/inboundList')
        },
        {
            path: 'inbound_edit/:id?',
            name: `${pre}inboundEdit`,
            meta: {
                auth: ['supplier-stock-inbound_edit'],
                title: '添加入库单'
            },
            component: () => import('@/pages/stock/inboundEdit')
        },
        {
            path: 'freight_list',
            name: `${pre}freightEdit`,
            meta: {
                auth: ['supplier-stock-freight_list'],
                title: '出库单'
            },
            component: () => import('@/pages/stock/freightList')
        },
        {
            path: 'freight_edit',
            name: `${pre}freightEdit`,
            meta: {
                auth: ['supplier-stock-freight_edit'],
                title: '添加出库单'
            },
            component: () => import('@/pages/stock/freightEdit')
        },
		{
		    path: 'remaining_stock',
		    name: `${pre}freightEdit`,
		    meta: {
		        auth: ['supplier-remaining-stock-list'],
		        title: '剩余库存'
		    },
		    component: () => import('@/pages/stock/remainingStock')
		},
		{
		    path: 'stand_stock',
		    name: `${pre}freightEdit`,
		    meta: {
		        auth: ['supplier-stand-stock-list'],
		        title: '标准版仓租'
		    },
		    component: () => import('@/pages/stock/standStock')
		},
		{
		    path: 'rent_free_stock',
		    name: `${pre}freightEdit`,
		    meta: {
		        auth: ['supplier-rent-free-stock-list'],
		        title: '30免租版'
		    },
		    component: () => import('@/pages/stock/rentFreeStock')
		},
    ]
};
